-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration Request 5 #12
Conversation
- Moved `/api/sessions/<pk>/swid_measurement` to `/api/sessions/<pk>/swid-measurement` - Moved endpoint from core app to swid app - Added optional format specifier to "add tags" endpoint
With SQL_DEBUG enabled, all executed SQL queries get printed to stdout.
This is used to render API endpoint documentation.
Changes Unknown when pulling eba8de0 on tnc-ba:integration5 into * on strongswan:master*. |
Changes Unknown when pulling 16b6236 on tnc-ba:integration5 into * on strongswan:master*. |
The API now allows a new `fields` parameter that can filter returned fields per document. The fields need to be comma separated, without any spaces. - Correct: `fields=id,url,packageName` - Wrong: `fields=id&fields=url` - Wrong: `fields=id, url` Nested entities can be shown or hidden, but their fields cannot be filtered.
Access to the API is granted in two cases: - User is an admin (`is_staff=True`) - User has the `auth.write_access` permission Otherwise, the user is rejected with a HTTP 401 or HTTP 403 status.
Changes Unknown when pulling fe7a0bb on tnc-ba:integration5 into * on strongswan:master*. |
Requested changes have been made & are squashed. |
@tobiasbrunner sorry, that comment got lost indeed. The files are now gone. |
Changes Unknown when pulling 75a4b67 on tnc-ba:integration5 into * on strongswan:master*. |
- Moves the `swid_measurement` API endpoint to `swid-measurement`, and requires the submitted data to be contained in a JSON object (`data` member). The API requires basic authentication and the user must either have the `is_staff=1` flag set or the `front.write_access` permission assigned (this is the case for the `admin-user`). - SWID tags are only updated when imported via management command, not via API (only entity names are updated). - API fields are restrictable using the `fields=` parameter. - Default users and root user have been removed from the databases. They can be added with `./manage.py setpassword` and `./manage.py createsuperuser --database meta`, respectively. - Adding files and package versions in the GUI are possible. - Several other improvements regarding paging/filtering, AJAX loading, the SWID Inventory, timezone handling and many other things are included too. Closes #12.
Possibly breaking changes
swid_measurement
API endpoint has been moved toswid-measurement
swid-measurement
andswid-add-tags
: Request data should now be submitted in adata
param:{"data": [...]}
instead of sending the JSON list directly./manage.py setpassword
./manage.py createsuperuser --database meta
is_staff=1
flag set or thefront.write_access
permission assigned (-> theadmin-user
has that permission by default)New features
fields=
param (see c9c4687)./manage.py syncdb
on MySQLFixes